package com.example.musicbox.service;

import com.baomidou.mybatisplus.extension.api.R;
import com.example.musicbox.utils.Result;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author : zhy
 * @since : 2022/8/1
 */
public interface FileOperationService {

    /**
     * 上传文件
     *
     * @param file
     * @return {@link boolean}
     * @author xieyucan
     * CreateDate 2022/2/26 16:11
     */
    public Result uploadFile(MultipartFile file, String token,String type);


    /**
     * 根据文件的key来删除文件(这里主要是图片)
     *
     * @param key
     * @return {@link boolean}
     * @author xieyucan
     * CreateDate 2022/2/26 16:14
     */
    public Result deleteFile(String key,String token);


    /**
     * 下载文件
     * @param key
     * @param path
     * @return
     */
    public Result downloadFile(String key,String path,String token);
}
